package com.taobao.api.internal.util;

import java.util.HashMap;
import java.util.Map;

public class RequestParametersHolder {

  private TaobaoHashMap protocalMustParams;
  private TaobaoHashMap protocalOptParams;
  private TaobaoHashMap applicationParams;

  public TaobaoHashMap getProtocalMustParams() {
    return protocalMustParams;
  }

  public void setProtocalMustParams(TaobaoHashMap protocalMustParams) {
    this.protocalMustParams = protocalMustParams;
  }

  public TaobaoHashMap getProtocalOptParams() {
    return protocalOptParams;
  }

  public void setProtocalOptParams(TaobaoHashMap protocalOptParams) {
    this.protocalOptParams = protocalOptParams;
  }

  public TaobaoHashMap getApplicationParams() {
    return applicationParams;
  }

  public void setApplicationParams(TaobaoHashMap applicationParams) {
    this.applicationParams = applicationParams;
  }

  public Map<String, String> getAllParams() {
    Map<String, String> params = new HashMap<String, String>();
    if (protocalMustParams != null && !protocalMustParams.isEmpty()) {
      params.putAll(protocalMustParams);
    }
    if (protocalOptParams != null && !protocalOptParams.isEmpty()) {
      params.putAll(protocalOptParams);
    }
    if (applicationParams != null && !applicationParams.isEmpty()) {
      params.putAll(applicationParams);
    }
    return params;
  }

}
